package day05work_d;

public class Lambda_test04 {
    public static void main(String[] args) {
        Calculator calculator = (new Calculator() {
            @Override
            public int calc(int i, int i1) {
                return (i + i1);
            }
        });


      useCalculator((int i,int i1) -> {
          return i+i1;
      });


    }

    public static void useCalculator(Calculator calculator){
        int result=calculator.calc(10,30);
            System.out.println(result);
    }

}
